<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:79:"/www/web/mysite/gh_pcyy_cn/public/../application/index/view/Set/timeemploy.html";i:1541297949;s:66:"/www/web/mysite/gh_pcyy_cn/application/index/view/Common/head.html";i:1648361810;s:66:"/www/web/mysite/gh_pcyy_cn/application/index/view/Common/menu.html";i:1540536055;s:68:"/www/web/mysite/gh_pcyy_cn/application/index/view/Common/footer.html";i:1540536055;}*/ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src='/index/lib/html5.js'></script>
    <script type="text/javascript" src="/index/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/index/static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="/index/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="/index/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/index/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="/index/static/h-ui.admin/css/style.css" />
    <link rel="stylesheet" type="text/css" href="/index/media.css" />
    <link rel="stylesheet" type="text/css" href="/index/yy/style.css" />
    <script type="text/javascript" src="/index/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="/index/lib/datatables/1.10.0/jquery.tablesorter.min.js"></script>
    <script type="text/javascript" src="/layer/layer.js"></script>

	<title>深圳鹏程</title>
    <!--[if IE 6]>
    <script type="text/javascript" src="/index/static/h-ui.admin/js/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <!--/meta 作为公共模版分离出去-->

    <style type="text/css">
        .menu>li>a{color:#000000;}
    </style>

    <!--_header 作为公共模版分离出去-->
    <header class="navbar-wrapper">
        <div class="navbar navbar-fixed-top">
            <div class="container-fluid cl"> <a class="logo navbar-logo f-l mr-10 hidden-xs" href="javascript:void(0);">深圳鹏程医院</a> <a class="logo navbar-logo-m f-l mr-10 visible-xs" href="javascript:void(0);">深圳鹏程医院</a>
                <span class="logo navbar-slogan f-l mr-10 hidden-xs">v2.0</span>
                <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;">&#xe667;</a>

                <nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
                    <ul class="cl">
            <li class="dropDown dropDown_hover" id="hello"></li>
            <li class="dropDown dropDown_hover"> <a href="#" class="dropDown_A">退出 <i class="Hui-iconfont">&#xe6d5;</i></a>

                            <ul class="dropDown-menu menu radius box-shadow">
                                <li><a href="/index/Login/logout">切换账户</a></li>
                                <li><a href="/index/Login/logout">退出</a></li>
                            </ul>
                        </li>

                        <li id="Hui-skin" class="dropDown right dropDown_hover"> <a href="javascript:;" class="dropDown_A" title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
                            <ul class="dropDown-menu menu radius box-shadow">
                                <li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
                                <li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
                                <li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
                                <li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
                                <li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
                                <li><a href="javascript:;" data-val="orange" title="橙色">橙色</a></li>
                            </ul>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
    </header>
    <script type="text/javascript">
        $(function(){
            //console.log(getCookie("auth"));
            //显示当前用户用户名
            $("#hello").html(getCookie("auth").split("-")[0]);

            function getCookie(name) {
                var cookies = document.cookie;
                var list = cookies.split("; ");          // 解析出名/值对列表
                    for(var i = 0; i < list.length; i++) {
                    var arr = list[i].split("=");          // 解析出名和值

                         if(arr[0] == name)
                             return decodeURIComponent(arr[1]);   // 对cookie值解码
                         } 
                return "";
            }

        });
    </script>
    <!--/_header 作为公共模版分离出去-->

<style type="text/css">

</style>

<!--_menu 作为公共模版分离出去-->
<aside class="Hui-aside">

    <div class="menu_dropdown bk_2">
        <ul>
            <?php if(is_array($qx) || $qx instanceof \think\Collection || $qx instanceof \think\Paginator): $i = 0; $__LIST__ = $qx;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;                if($vo['p_content']){
                ?>
<li><a href="<?php echo $vo['p_action']; ?>" title="<?php echo $vo['p_content']; ?>"><?php echo $vo['p_content']; ?></a></li>
            <?php
                }
            endforeach; endif; else: echo "" ;endif; 				if(isMobile()){
            ?>
            <li><a href="/index/Login/logout">退出</a></li>
            <?php
                }
			?>
        </ul>
    </div>
</aside>

<script type="text/javascript">
    function showtc(){
        layer.open({
            title:"添加",
            type: 2,
            area: ['900px', '600px'],
            fixed: false, //不固定
            maxmin: true,
            content: '/index/Index/tcadd'
        });
    }

    $(function(){
        //设置弹窗按钮的链接
        //$("ul li").getAttribute("title");
        $(".bk_2 ul li a").each(function(i){
            //不可更改，屏幕太小，不显示分析按钮
           if(this.title=="添加"&&document.body.clientWidth>760){
               this.href="javascript:showtc()";
           }

            if(this.title=="统计"&&document.body.clientWidth<760){
                console.log($(this).css("display","none"));
            }

            if(this.title=="项目统计"&&document.body.clientWidth<760){
                console.log($(this).css("display","none"));
            }
		


        });
    });


</script>

<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
<!--/_menu 作为公共模版分离出去-->


<link href="/index/yy/index.css" rel="stylesheet">
<link href="/index/yy/laydate.css" rel="stylesheet">
<script src="/index/yy/laydate.js"></script>
<script type="text/javascript" src="/index/laydate/laydate.js"></script>


<style type="text/css">
    *{font-size: 15px!important;}
    .select_date{  width: 20%;  float: left;  }
    .table th, .table td{line-height: 30px!important;}
    .table-cont{
        width: 100%;
        max-height: 100%;
        overflow: auto;
        float: left;
    }

    .test-5::-webkit-scrollbar {/*滚动条整体样式*/
        width: 10px;     /*高宽分别对应横竖滚动条的尺寸*/
        height: 1px;
    }
    .test-5::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
        background: #535353;
    }
    .test-5::-webkit-scrollbar-track {/*滚动条里面轨道*/
        -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
        border-radius: 10px;
        background: #EDEDED;
    }

    .time_table td{text-align:center;}
    tbody .pointer{cursor: pointer}

</style>

<section class="Hui-article-box">

    <div class="select_date">
        <span id="selectdata" class="">选择日期:</span>
        <div class="laydate-box">
            <input type="text" id="laydateInputs" placeholder="年-月-日">
        </div>
    </div>
<div id="table-cont"  class='table-cont test-5'>
    <!--今日项目预约时间占用表-->
    <table class="table table-border table-bordered table-hover time_table">

            <thead>
            <tr class="success" style="background: #eeeeee;">
                <td>时间</td>
                <?php
                foreach($projects as $k => $v){
                ?>
                <td><?php echo $v; ?></td>
                <?php
                }
                ?>
            </tr>
            </thead>

        <!--
    </table>
    <table class="table table-border table-bordered table-hover time_table">


        <?php
        dd($data);

?>-->
        <tbody >
        <?php
            foreach($data as $a => $b){
        ?>
                <tr>
                    <td><?php echo substr($a,0,5); ?></td>
                    <?php
                        foreach($b as $bk => $bv){
                    ?>
                    <td class="pointer" onclick="add('<?php echo $a; ?>','<?php echo $bk; ?>')">
                        <?php
                            if(sizeof($bv)>0){
                                foreach($bv as $ck => $cv){
                                    echo $cv."<br/>";
                                }
                            }
                        ?>
                    </td>
                    <?php
                        }
                    ?>
                </tr>
        <?php
            }
        ?>
        </tbody>

    </table>
</div>
</section>


<!--_footer 作为公共模版分离出去-->

<script type="text/javascript" src="/index/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/index/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/index/static/h-ui.admin/js/H-ui.admin.page.js"></script>
<script type="text/javascript" src="/index/js/hd.js"></script>

<!--/_footer /作为公共模版分离出去-->

<script type="text/javascript">

    //传递两参数，时间、项目，打开弹窗页面，设置好选择的时间项目即可
    function add(time,item){
		date = $("#laydateInputs").val();
        layer.open({
            title:"添加",
            type: 2,
            area: ['900px', '600px'],
            fixed: false, //不固定
            maxmin: true,
            content: '/index/Set/tcadd?time='+time+'&item='+item+'&date='+date
        });
		
    }

    window.onload = function(){
        var tableCont = document.querySelector('#table-cont');
        function scrollHandle (e){

            var scrollTop = this.scrollTop;
            this.querySelector('thead').style.transform = 'translateY(' + scrollTop + 'px)';
        }

        tableCont.addEventListener('scroll',scrollHandle);
    };


    $(function(){
        set_time = getQueryVariable('time')?getQueryVariable('time'):getNowFormatDate();
        setTimeout("$('#laydateInputs').val(set_time);",500);

        //常规用法
        laydate.render({
            elem: '#laydateInputs' ,
            done: function(value, date, endDate){
                console.log(value); //得到日期生成的值，如：2017-08-18
                window.location.href="/index/Set/timeemploy?time="+value;
                //$("#laydateInput").val();

            }
        });


        $("tbody tr").each(function(){
                $(this).children("td").each(function(i){
                    $(this).mouseover(function(){
                        $(this).parent().css("backgroundColor","");
                        $("tbody tr").each(function(){
                            $(this).children("td").each(function(j){
                                if(i==j){
                                    $(this).css("backgroundColor","#f5f5f5");
                                }
                            });
                        });
                    });
                    $(this).mouseout(function(){
                        $(this).parent().css("backgroundColor","");
                        $("tbody tr").each(function(){
                            $(this).children("td").each(function(k){
                                if(i==k){
                                    $(this).css("backgroundColor","");
                                }
                            });
                        });
                    });
                });

        });
    });


    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i=0;i<vars.length;i++) {
            var pair = vars[i].split("=");
            if(pair[0] == variable){return pair[1];}
        }
        return(false);
    }

    function getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = year + seperator1 + month + seperator1 + strDate;
        return currentdate;
    }


</script>